let shell = require('shelljs')
module.exports = function () {
    return new Promise((resolve, reject) => {
        shell.cd('/root/frontend')
        shell.exec('git pull')
        shell.exec('docker build -t frontend ./')
        shell.exec('docker stop frontend')
        shell.exec('docker rm frontend')
        shell.exec('docker run --name frontend -tid -p 80:5000 frontend')
        resolve()
    })
}
